import requests

url = "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.zhimg.com%2Fv2-b853455b52bb68559ba0392eb7e780e8_1440w.jpg%3Fsource%3D172ae18b&refer=http%3A%2F%2Fpic1.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1665668070&t=f0b8b1184d77b55b7b3e83a3ff77b558"
url1 = "https://img0.baidu.com/it/u=77179490,2845248485&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=173"
rep = requests.request(method='get', url=url1)
with open('.\键盘1.jpg', 'wb') as f:
    f.write(rep.content)